<div class="park-footer">
    <div class="park-footer-nav">
        <div class="park-footer-nav-item <if condition="$act eq 'index'">park-footer-nav-item--active</if>" onclick="nav_detail(1);">
            <div class="nav-icon nav-icon__home"></div>
            <div class="nav-text">首页</div>
        </div>
        <div class="park-footer-nav-item <if condition="$act eq 'cate'">park-footer-nav-item--active</if>" onclick="nav_detail(2);">
            <div class="nav-icon nav-icon__type"></div>
            <div class="nav-text">分类</div>
        </div>
        <div class="park-footer-nav-item <if condition="$act eq 'cart'">park-footer-nav-item--active</if>" onclick="nav_detail(3);">
            <div class="nav-icon nav-icon__cart"></div>
            <div class="nav-text">购物车</div>
        </div>
        <div class="park-footer-nav-item <if condition="$act eq 'user'">park-footer-nav-item--active</if>" onclick="nav_detail(4);">
            <div class="nav-icon nav-icon__user"></div>
            <div class="nav-text">个人中心</div>
        </div>
    </div>
</div>
<script>
    function nav_detail(num){
        if(num==1){
            var url = "{:U('Home/Index/index','',false)}";
        }else if(num==2){
            var url = "{:U('Home/Category/index','',false)}";
        }else if(num==3){
            var url = "{:U('Home/Cart/index','',false)}";
        }else if(num==4){
            var url = "{:U('Home/User/index','',false)}";
        }
        window.location = url;
    }
</script>